#include "mode_standby.h"
#include "actuator_control.h"

// 待机模式进入
void standby_mode_enter(ModeConfig* config) {
    // 关闭所有设备
    actuator_set_compressor(false);
    actuator_set_bypass_valve(false);
    actuator_set_cooling_valve(false);
    actuator_set_precool_valve(false);
    actuator_set_main_motor(false);
    actuator_set_pump(false);
    actuator_set_mixer(false);
    actuator_set_sterilize_light(false);
    
    printf("Entering standby mode\n");
}

// 待机模式处理
void standby_mode_process(ModeConfig* config, SensorData* sensors, DeviceState* state) {
    // 待机模式下只需保持设备关闭
    state->comp_running = false;
    state->bypass_valve = false;
    state->cooling_valve = false;
    state->precool_valve = false;
    state->motor_running = false;
    state->pump_running = false;
    state->mixer_running = false;
    state->sterilize_on = false;
}

// 待机模式退出
void standby_mode_exit(void) {
    printf("Exiting standby mode\n");
}
